"""author: wenyao
   data: 2020/10/20
   project: ludingji
"""
#######计算1-5的和###############
# count = 0
# sum =0
# while count < 5 :
#     count += 1
#     sum += count
# print(sum)

########登录时 密码最多输入3次###############
# username = input("please input your name:")
# if username == "root":
#     i = 1
#     while i <=3:
#         password = input("please input your passwd:")
#         if password == "123456":
#             print("登陆成功!")
#             break
#         else:
#             i += 1
#             print(f"密码错误！还有{4-i}次机会")
# else:
#     print("用户名错误")

#==================while else==================
#while 或者for 进行正常退出的时候，才会执行else里的语句
# count = 0
# while count <5 :
#     count += 1
#     print(count)
#     break
# else:
#     print("end")

